import { Base } from '../../utils/base.js'
class OrderDetail extends Base {
  constructor() {
    super()
  }
  //获取订单详情列表
  getDetailList(parames, callback) {
    let url = "/ddaigo-platform/order/detailList";
    this.commonRequest(url, parames, callback);
  } 
  // 根据id获取单个地址
  getUserAddressById(params, callback) {
      var url = '/ddaigo-platform/user/getUserAddressById';
      var reType = 'POST';
      this.commonRequest(url, params, callback);
  }
  // 减库存接口
  reduceGoodsStock(params, callback) {
      var url = '/ddaigo-platform/order/reduceGoodsStock'
      this.commonRequest(url, params, callback);
  }
  // 付款
  wxPay(parames, callback) {
      let url = "/ddaigo-platform/pay/doUnifiedOrder";
      this.commonRequest(url, parames, callback);
  } 
  // 优惠券列表
  orderCouponList(params, callback) {
      var url = '/ddaigo-platform/coupon/orderCouponList'; 
      this.commonRequest(url, params, callback);
  }
  // 使用优惠券
  orderCouponUse(params, callback) {
      var url = '/ddaigo-platform/coupon/orderCouponUse'; 
      this.commonRequest(url, params, callback);
  }
  // 会员支付
  doUnifiedOrderForRechargeMember(params, callback) {
      let url = '/ddaigo-platform/pay/doUnifiedOrderForRechargeMember'
      var reType = 'POST';
      this.commonRequest(url ,params, callback);
  }
  // 优惠券1.0
  getMemberCouponsInfo(params, callback) {
      var url = '/ddaigo-platform/order/getMemberCouponsInfo';
      this.commonRequest(url, params, callback);
  }
}
module.exports = {
  OrderDetail
}